{
    "dataset_reader": {
      "class_name": "intents_dataset_reader:IntentsJsonReader",
      "data_path": "./",
      "train": "intent_phrases.json",
      "generated_data_path": "./generated_data"
    },
    "dataset_iterator": {
        "class_name": "basic_classification_iterator",
        "seed": 42,
        "split_seed": 23,
        "field_to_split": "train",
        "split_fields": [
          "train",
          "valid"
        ],
        "split_proportions": [
          0.8,
          0.2
        ]
    },
    "chainer": {
      "in": [
        "x"
      ],
      "in_y": [
        "y"
      ],
      "pipe": [
        {
          "class_name": "torch_transformers_preprocessor",
          "vocab_file": "{TRANSFORMER}",
          "do_lower_case": true,
          "max_seq_length": 64,
          "in": [
            "x"
          ],
          "out": [
            "bert_features"
          ]
        },
        {
          "id": "classes_vocab",
          "class_name": "simple_vocab",
          "fit_on": [
            "y"
          ],
          "save_path": "{MODEL_PATH}/classes.dict",
          "load_path": "{MODEL_PATH}/classes.dict",
          "in": [
            "y"
          ],
          "out": [
            "y_ids"
          ]
        },
        {
          "id": "my_one_hotter",
          "in": [
            "y_ids"
          ],
          "out": [
            "y_onehot"
          ],
          "class_name": "one_hotter",
          "depth": "#classes_vocab.len",
          "single_vector": true
        },
        {
          "class_name": "torch_transformers_classifier",
          "n_classes": "#classes_vocab.len",
          "return_probas": true,
          "one_hot_labels": true,
          "multilabel": true,
          "pretrained_bert": "{TRANSFORMER}",
          "save_path": "{MODEL_PATH}/model",
          "load_path": "{MODEL_PATH}/model",
          "optimizer": "AdamW",
          "optimizer_parameters": {
            "lr": 1e-05
          },
          "learning_rate_drop_patience": 5,
          "learning_rate_drop_div": 2.0,
          "in": [
            "bert_features"
          ],
          "in_y": [
            "y_onehot"
          ],
          "out": [
            "y_pred_probas"
          ]
        },
        {
          "in": [
            "y_pred_probas"
          ],
          "out": [
            "y_pred_ids"
          ],
          "class_name": "proba2labels",
          "max_proba": false,
          "confidence_threshold": 0.5
        },        
        {
          "ref": "my_one_hotter",
          "in": [
            "y_pred_ids"
          ],
          "out": [
            "y_pred_onehot"
          ]
        },
        {
          "in": [
            "y_pred_ids"
          ],
          "out": [
            "y_pred_labels"
          ],
          "ref": "classes_vocab"
        }
      ],
      "out": [
        "y_pred_labels",
        "y_pred_probas"
      ]
    },
    "train": {
      "epochs": 5,
      "batch_size": 64,
      "metrics": [
        {
          "name": "accuracy",
          "inputs": [
            "y",
            "y_pred_labels"
          ]
        },
        {
          "name": "f1_weighted",
          "inputs": [
            "y_onehot",
            "y_pred_onehot"
          ]
        },
        {
            "name": "f1_macro",
            "inputs": [
              "y_onehot",
              "y_pred_onehot"
            ]
        },
        {
          "name": "roc_auc",
          "inputs": [
            "y_onehot",
            "y_pred_probas"
          ]
        }
      ],
      "validation_patience": 5,
      "val_every_n_epochs": 1,
      "log_every_n_epochs": 1,
      "show_examples": false,
      "evaluation_targets": [
        "train",
        "valid"
      ],
      "class_name": "torch_trainer"
    },
    "metadata": {
      "imports": [
        "intents_dataset_reader"
      ],
      "variables": {
        "TRANSFORMER": "distilbert-base-uncased",
        "ROOT_PATH": "~/.deeppavlov",
        "DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
        "MODELS_PATH": "{ROOT_PATH}/models",
        "MODEL_PATH": "{MODELS_PATH}/classifiers/intents_model_v2"
      },
      "download": [
        {
          "url": "http://files.deeppavlov.ai/deeppavlov_data/intents_model_v2.tar.gz",
          "subdir": "{MODELS_PATH}/classifiers"
        }
      ]
    }
  }
